<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0060)http://115.28.87.22:8888/business/SetuBillListForUnComp.html -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>安装单反完工 | 管理易-广告加工制作管理软件  企业版 9.28  | 易凯软件</title>
<script src="../js/minierp.js"></script>

<link href="../css/Query.css" rel="stylesheet" type="text/css">
<link href="../css/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="../css/BillList.css">
<script src="../js/QueryList.js"></script>
<script src="../js/popup_ext.js"></script>
<script src="../js/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function doShow(id){
		var url="../business/SetuBillEdit.html?id="+id;
		ShowIframe("安装单",url,1024,500,"refreshWin()",1024,600);
	}
	function doUnComp(id){
		ShowConfirm('确认框','确定反完工吗？',340,80,"doUnCompCallBack('"+id+"')");
	}
	function doUnCompCallBack(id){
		if(popRetVal!=null){
			var url="../business/SetuBillUnComp.html?id_str="+id;
			ShowIframe("业务单反审核",url,200,200,"refreshWin()");
		}
	}
	function doMutiUnComp(){
		var ob_arr = document.getElementsByName("query_checkbox");
		var str="";
		for (i=0;i<ob_arr.length;i++){
			if ((ob_arr[i].checked == true)){
				if(str!=""){
					str=str+";";
				}
				str = str+ob_arr[i].value;
			}
		}
		
		if(str!=""){
			doUnComp(str);
		}else{
			ShowAlert('提示框','请选择要反完工的安装单',200,100);
		}
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location=window.location;
		}
	}
	function createPageParaStr(){
		var str="bill_start="+encodeURIComponent(document.getElementById("bill_start").value);
		str=str+"&bill_end="+encodeURIComponent(document.getElementById("bill_end").value);
		str=str+"&bb_code="+encodeURIComponent(document.getElementById("bb_code").value);
		str=str+"&est_name="+encodeURIComponent(document.getElementById("est_name").value);
		str=str+"&lm="+encodeURIComponent(document.getElementById("lm").value);
		str=str+"&phon="+encodeURIComponent(document.getElementById("phon").value);
		str=str+"&cont="+encodeURIComponent(document.getElementById("cont").value);
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("bill_code").value);
		str=str+"&crea_name="+encodeURIComponent(document.getElementById("crea_name").value);
		str=str+"&mng_name="+encodeURIComponent(document.getElementById("mng_name").value);
		str=str+"&setu_name="+encodeURIComponent(document.getElementById("setu_name").value);
		str=str+"&ts_id="+document.getElementById("ts_id").value;
		
		return str;
	}
	
	function createProgramParaStr(){
		var str="bill_start="+encodeURIComponent(document.getElementById("hid_bill_start").value);
		str=str+"&bill_end="+encodeURIComponent(document.getElementById("hid_bill_end").value);
		str=str+"&bb_code="+encodeURIComponent(document.getElementById("hid_bb_code").value);
		str=str+"&est_name="+encodeURIComponent(document.getElementById("hid_est_name").value);
		str=str+"&lm="+encodeURIComponent(document.getElementById("hid_lm").value);
		str=str+"&phon="+encodeURIComponent(document.getElementById("hid_phon").value);
		str=str+"&cont="+encodeURIComponent(document.getElementById("hid_cont").value);
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("hid_bill_code").value);
		str=str+"&crea_name="+encodeURIComponent(document.getElementById("hid_crea_name").value);
		str=str+"&mng_name="+encodeURIComponent(document.getElementById("hid_mng_name").value);
		str=str+"&setu_name="+encodeURIComponent(document.getElementById("hid_setu_name").value);
		str=str+"&ts_id=1";
		
		return str;
	}
	
	function doSearch(){
		var str;
		if(IsAdvSearch){//高级
			str="search_type=1";
			
			if(document.getElementById("cb_bill_date").checked){
				if(!checkDateStr(document.getElementById("bill_start").value,"开始日期")){
					return;
				}
				if(!checkDateStr(document.getElementById("bill_end").value,"结束日期")){
					return;
				}
				str=str+"&cb_bill_date=1";
			}
			if(document.getElementById("cb_bb_code").checked){
				var bbCode=document.getElementById("bb_code").value.trim();
				if(bbCode==null || bbCode==""){
					ShowAlert('提示框','请输入业务单号',200,100);
					return;
				}
				str=str+"&cb_bb_code=1";
			}
			if(document.getElementById("cb_est").checked){
				var estName=document.getElementById("est_name").value.trim();
				if(estName==null || estName==""){
					ShowAlert('提示框','请输入订货单位',200,100);
					return;
				}
				str=str+"&cb_est=1";
			}
			if(document.getElementById("cb_lm").checked){
				var lm=document.getElementById("lm").value.trim();
				if(lm==null || lm==""){
					ShowAlert('提示框','请输入联系人姓名',200,100);
					return;
				}
				str=str+"&cb_lm=1";
			}
			if(document.getElementById("cb_phon").checked){
				var phon=document.getElementById("phon").value.trim();
				if(phon==null || phon==""){
					ShowAlert('提示框','请输入电话',200,100);
					return;
				}
				str=str+"&cb_phon=1";
			}
			if(document.getElementById("cb_cont").checked){
				var cont=document.getElementById("cont").value.trim();
				if(cont==null || cont==""){
					ShowAlert('提示框','请输入摘要',200,100);
					return;
				}
				str=str+"&cb_cont=1";
			}
			if(document.getElementById("cb_bill_code").checked){
				var billCode=document.getElementById("bill_code").value.trim();
				if(billCode==null || billCode==""){
					ShowAlert('提示框','请输入安装单号',200,100);
					return;
				}
				str=str+"&cb_bill_code=1";
			}
			if(document.getElementById("cb_crea").checked){
				var creaName=document.getElementById("crea_name").value.trim();
				if(creaName==null || creaName==""){
					ShowAlert('提示框','请输入开单人姓名',200,100);
					return;
				}
				str=str+"&cb_crea=1";
			}
			if(document.getElementById("cb_mng").checked){
				var mngName=document.getElementById("mng_name").value.trim();
				if(mngName==null || mngName==""){
					ShowAlert('提示框','请输入负责人姓名',200,100);
					return;
				}
				str=str+"&cb_mng=1";
			}
			if(document.getElementById("cb_setu").checked){
				var setuName=document.getElementById("setu_name").value.trim();
				if(setuName==null || setuName==""){
					ShowAlert('提示框','请输入安装人员姓名',200,100);
					return;
				}
				str=str+"&cb_setu=1";
			}
			if(document.getElementById("cb_ts").checked){
				var tsId=document.getElementById("ts_id").value;
				if(tsId==null || tsId=="" || tsId=="0"){
					ShowAlert('提示框','请选择帐套',200,100);
					return;
				}
				str=str+"&cb_ts=1";
			}
		}else{//快速
			str="search_type=2";
			if(!checkDateStr(document.getElementById("bill_start").value,"开始日期")){
				return;
			}
			if(!checkDateStr(document.getElementById("bill_end").value,"结束日期")){
				return;
			}
		}
		
		var paraStr=createPageParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		window.location="../business/SetuBillListForUnComp.html?"+str;
	}
	function doGo(pageIndex){
		var str=getSearchCondition();
		str=str+"&current_page="+pageIndex;
		window.location="../business/SetuBillListForUnComp.html?"+str;
	}
	
	function getSearchCondition(){
		var searchType="1";
		var str="search_type="+searchType;
		if(searchType=="1"){//高级
			
			
			
			
			
			
			
			
			
			
			str=str+"&cb_ts=1";
		}else{//快速
			
		}
		
		var paraStr=createProgramParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		
		return str;
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function DoubleClick(it){
		var ob_arr = document.getElementsByName("query_checkbox");
		var str="";
		if(ob_arr.length>=it.getAttribute("index")){
			str=ob_arr[it.getAttribute("index")-1].value;
		}
		if(str==""){
			return;
		}
		doShow(str);
	}
	function doCancel(){
		window.close();
	}
	function doInit(){
		//Window_Onload();
	}
	function checkInput(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doAutoCheck(objId){
		document.getElementById(objId).checked=true;
	}
	function selectStafferName(objId,checkObjId){
		var url="../base/StafferMainForSelect.html";
		ShowIframe("选择员工",url,800,500,"selectStafferNameCallBack('"+objId+"','"+checkObjId+"')");
	}
	function selectStafferNameCallBack(objId,checkObjId){
		if(popRetVal!=null){
			var arr=popRetVal.split(";");
			document.getElementById(objId).value=arr[1];
			doAutoCheck(checkObjId);
		}
	}
	function setDate(type,objType){
		var d=new Date();
		var startStr="";
		var endStr="";
		if(type=="CURRENT_MONTH"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-01";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="PREVIEW_MONTH"){
			d=new Date(d.getFullYear(),d.getMonth(),1);
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-1";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="TODAY"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="YESTERDAY"){
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}
		if(objType=="BILL"){
			document.getElementById("bill_start").value=startStr;
			document.getElementById("bill_end").value=endStr;
			doAutoCheck("cb_bill_date");
		}else if(objType=="PLAN"){
			document.getElementById("plan_start").value=startStr;
			document.getElementById("plan_end").value=endStr;
			doAutoCheck("cb_plan_date");
		}else if(objType=="REAL"){
			document.getElementById("real_start").value=startStr;
			document.getElementById("real_end").value=endStr;
			doAutoCheck("cb_real_date");
		}
	}
	function selectEstName(){
		var url="../base/EstablishmentListForSelect.html?type=CLIENT";
		ShowIframe("选择客户",url,900,500,"selectEstNameCallBack()");
	}
	function selectEstNameCallBack(){
		if(popRetVal!=null){
			document.getElementById("est_name").value=popRetVal[1];
			doAutoCheck("cb_est");
		}
	}
</script>
</head>
<body oncontextmenu="return false">
<div class="Wrap"><!-- 页面主框架 -->
    
	<div id="ListContainer" class="Container" style="width: 984px;"><!-- 主体容器 -->
	    
	    <!-- 标题栏 -->
	    <div class="Heading BillIcon">
	        <div class="HeadingContent">
	            <h1>安装单反完工</h1>
	            <span class="Note">把安装单恢复为未完工状态</span>
	        </div>
	    </div>
	
		<!-- 主内容 -->
		<div class="Content">
	        <!-- 筛选控件栏 -->
	        <div class="FilterBar ClearFix">
	            <div class="SearchIcon"></div>
	            <span class="fl">
	            	<table class="MoreOption" cellpadding="0" cellspacing="0">
	            		<tbody><tr><th class="c1" width="80px">
	            			<input type="checkbox" name="cb_bb_code" id="cb_bb_code" style="visibility:hidden;">
			        		业务单号
	            		</th>
	            		<td class="c1" width="360px">
	            			<input type="text" class="TextBox" maxlength="50" name="bb_code" id="bb_code" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_bb_code&#39;);" value="">
							<input type="hidden" id="hid_bb_code" value="">
	            		</td>
	            	</tr></tbody></table>
	            </span>
				<span class="fr">
	            	<a href="javascript:;" id="lnkMoreOption">更多查询选项</a>
		  			<input type="button" value=" 查 询" onclick="doSearch();" class="buttom search-but" id="sSearchButton" name="sSearchButton">
		  			<input type="button" class="buttom  search-audit" value=" 反完工" onclick="doMutiUnComp();">
	            </span>
				<div id="dvMoreOptionBox" class="MoreOptionBox" style="display:none;">
					<table class="MoreOption" cellpadding="0" cellspacing="0">
						<tbody><tr>
							<th class="c1" width="80px">
			        			<input type="checkbox" name="cb_bill_date" id="cb_bill_date">
	            				派单日期
			        		</th>
			    			<td width="260px">
			        			<input type="text" class="TextBox Datetime" maxlength="15" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_bill_date&#39;);" id="bill_start" name="bill_start" value="2017-07-01">
				            	<img src="../images/calendar.gif" class="imgIconButton" onclick="displayCalendar(document.getElementById(&#39;bill_start&#39;),&#39;yyyy-mm-dd&#39;,this,false,&#39;doAutoCheck(\&#39;cb_bill_date\&#39;)&#39;);">
				            	<input type="hidden" id="hid_bill_start" value="2017-07-01">
				            	至
				            	<input type="text" class="TextBox Datetime" maxlength="15" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_bill_date&#39;);" id="bill_end" name="bill_end" value="2017-07-05">
				            	<img src="../images/calendar.gif" class="imgIconButton" onclick="displayCalendar(document.getElementById(&#39;bill_end&#39;),&#39;yyyy-mm-dd&#39;,this,false,&#39;doAutoCheck(\&#39;cb_bill_date\&#39;)&#39;);">
				            	<input type="hidden" id="hid_bill_end" value="2017-07-05">
			    			</td>
			    			<th class="c2" width="80px">
								<input type="checkbox" name="cb_bill_code" id="cb_bill_code">
			        			安装单号
			        		</th>
			    			<td class="c3" width="280px">
			    				<input type="text" class="TextBox" maxlength="50" name="bill_code" id="bill_code" onfocus="doAutoCheck(&#39;cb_bill_code&#39;);" onkeyup="checkInput();" value="">
								<input type="hidden" id="hid_bill_code" value="">
			        		</td>
			    		</tr>
			    		<tr>
			    			<th class="c1">
			    				<input type="checkbox" name="cb_est" id="cb_est">
			        			订货单位
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="est_name" id="est_name" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_est&#39;);" value="">
								<img class="imgIconButton" src="../images/make-a.gif" onclick="selectEstName();">
								<input type="hidden" id="hid_est_name" value="">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_setu" id="cb_setu">
			        			安装人员
			        		</th>
			        		<td class="c3">
			        			<input type="text" class="TextBox" maxlength="15" name="setu_name" id="setu_name" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_setu&#39;);" value="">
								<img class="imgIconButton" src="../images/make-a.gif" onclick="selectStafferName(&#39;setu_name&#39;,&#39;cb_setu&#39;);">
								<input type="hidden" id="hid_setu_name" value="">
			    			</td>
						</tr>
						<tr>
							<th class="c1">
								<input type="checkbox" name="cb_lm" id="cb_lm">
			        			联系人
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="lm" id="lm" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_lm&#39;);" value="">
								<input type="hidden" id="hid_lm" value="">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_mng" id="cb_mng">
			        			安装负责人
			        		</th>
			        		<td class="c3">
			        			<input type="text" class="TextBox" maxlength="15" name="mng_name" id="mng_name" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_mng&#39;);" value="">
			        			<img class="imgIconButton" src="../images/make-a.gif" onclick="selectStafferName(&#39;mng_name&#39;,&#39;cb_mng&#39;);">
								<input type="hidden" id="hid_mng_name" value="">
			    			</td>
			    		</tr>
			    		<tr>
			    			<th class="c1">
			        			<input type="checkbox" name="cb_phon" id="cb_phon">
			        			电话
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="phon" id="phon" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_phon&#39;);" value="">
								<input type="hidden" id="hid_phon" value="">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_creater" id="cb_crea">
			        			开单人
			        		</th>
			        		<td class="c3">
			        			<input type="text" class="TextBox" maxlength="15" name="crea_name" id="crea_name" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_crea&#39;);" value="">
								<img class="imgIconButton" src="../images/make-a.gif" onclick="selectStafferName(&#39;crea_name&#39;,&#39;cb_crea&#39;);">
								<input type="hidden" id="hid_crea_name" value="">
			    			</td>
						</tr>
						<tr>
							<th class="c1">
								<input type="checkbox" name="cb_cont" id="cb_cont">
			        			业务单摘要
			        		</th>
			    			<td class="c1">
			    				<input type="text" class="TextBox" maxlength="50" name="cont" id="cont" onkeyup="checkInput();" onfocus="doAutoCheck(&#39;cb_cont&#39;);" value="">
								<input type="hidden" id="hid_cont" value="">
			        		</td>
			        		<th class="c2">
			        			<input type="checkbox" name="cb_ts" id="cb_ts" checked="true">
	                        	账套
			        		</th>
			    			<td class="c3">
			        			<select name="ts_id" id="ts_id" onfocus="doAutoCheck(&#39;cb_ts&#39;);">
				    				<option value="0">==请选择账套==</option>
				    				
									<option value="1" selected="">新异</option>
									<option value="2">网络公司</option>
								</select>
			        		</td>
						</tr>
					</tbody></table>
					
					<div class="OptionOrderBy">
						<span class="fr"><a href="javascript:;" id="lnkHiddenOption">隐藏查询选项</a></span>
	                </div>
				</div>
			</div>
			
			<!-- 提示信息显示栏 -->
	        <div class="MsgBar">
	            
<table width="98%" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr id="errorMsgTr" style="display:none">
	  <td>
	  	<div class="msg-error" id="errorMsgTd">
	  	
	  	</div>
	  </td>
	</tr>
</tbody></table>
	        </div>
			<div class="table-list">
		  		<table width="100%">
					<tbody><tr>
						<th width="14"><input type="checkbox" onclick="javascript:checkall(this);"></th>
						<th width="12%">安装单号
						</th><th width="8%">派单日期</th>
						<th width="10%">订货单位</th>
						<th width="12%">业务单号
						</th><th width="14%">业务摘要
						</th><th width="8%">金额
						</th><th width="8%">实际完工</th>
						<th width="8%">安装人员</th>
						<th width="6%">负责人</th>
						<th width="6%">完工人</th>
						<th width="8%">操作</th>
					</tr>
					
				</tbody></table>
			</div>

			<!-- 底栏 分页、操作等 -->
	        <div class="BottomToolBar ClearFix">
			    	
    <div class="table-bot">
    	
    	
    	 
    	  <img src="../images/but001.gif">
    	  <img src="../images/but002.gif">
    	    	
    	第 <input type="text" name="pageNumber" style="width:30px" value="0" onkeydown="javascript:doJump(this.value);" class="TextBox"> 页 
    	共0页
		
		
        <img src="../images/but003.gif">
        <img src="../images/but004.gif">
		
    </div>
	        </div>
			
		</div>
	</div>
</div>


<script type="text/javascript">
	function ChangeWindowSize( container, maxWidth ){
	    setTimeout( function(){
	        var w1 = document.documentElement.clientWidth-40;
	        if( w1>maxWidth ) w1 = maxWidth;
	        else if( w1<970 ) w1 = 960;
	        container.style.width = w1+'px';
	    }, 300 );
	}
	var IsAdvSearch = false;
	(function(){
		doInit();
	    var ListContainer = document.getElementById('ListContainer');
	    ChangeWindowSize( ListContainer, 2020 );    // 超过 1280 的最大 1260 ，不全部铺满
	
	    var lnkMoreOption   = document.getElementById('lnkMoreOption');
	    var lnkHiddenOption = document.getElementById('lnkHiddenOption');
	    lnkMoreOption.onclick = function(){
	    	IsAdvSearch = true;
	        document.getElementById('dvMoreOptionBox').style.display = 'block';
	        document.getElementById('cb_bb_code').style.visibility = 'visible';
	        this.style.visibility = 'hidden';
	    };
	    lnkHiddenOption.onclick = function(){
	    	IsAdvSearch = false;
	        document.getElementById('dvMoreOptionBox').style.display = 'none';
	        document.getElementById('cb_bb_code').style.visibility = 'hidden';
	        lnkMoreOption.style.visibility = 'visible';
	    };
	})();
</script>
</body></html>